﻿using AutoMapper;
using BasicInformation.ApiWrite.Application.Command.Carrier;
using BasicInformation.ApiWrite.Application.Command.Category;
using BasicInformation.ApiWrite.Application.Command.Client;
using BasicInformation.ApiWrite.Application.Command.Depot;
using BasicInformation.ApiWrite.Application.Command.Device;
using BasicInformation.ApiWrite.Application.Command.Inbound;
using BasicInformation.ApiWrite.Application.Command.Inventory;
using BasicInformation.ApiWrite.Application.Command.Location;
using BasicInformation.ApiWrite.Application.Command.Product;
using BasicInformation.ApiWrite.Application.Command.Storage;
using BasicInformation.ApiWrite.Application.Command.Supplier;
using BasicInformation.ApiWrite.Application.Command.Unit;
using BasicInformation.Domain;


namespace BasicInformation.ApiWrite
{
    public class Mappers:Profile
    {
        public Mappers()
        {
            //仓库管理
            CreateMap<AddDepotCommand,DepotModel>().ReverseMap();
            CreateMap<UpdateDepotCommand, DepotModel>().ReverseMap();
            //库位
            CreateMap<AddLocationCommand, LocationModel>().ReverseMap();
            CreateMap<UpdateLocationCommand, LocationModel>().ReverseMap();
            //设置
            CreateMap<AddDeviceCommand, DeviceModel>().ReverseMap();
            CreateMap<UpdateDeviceCommand, DeviceModel>().ReverseMap();
            //供应商
            CreateMap<AddSupplierCommand, SupplierModel>().ReverseMap();
            CreateMap<UpdateSupplierCommand, SupplierModel>().ReverseMap();
            //客户
            CreateMap<AddClientCommand, ClientModel>().ReverseMap();
            CreateMap<UpdateClientCommand, ClientModel>().ReverseMap();
            //单元
            CreateMap<AddUnitCommand, UnitModel>().ReverseMap();
            CreateMap<UpdateUnitCommand, UnitModel>().ReverseMap();
            //承运商
            CreateMap<AddCarrierCommand, CarrierModel>().ReverseMap();
            CreateMap<UpdateCarrierCommand, CarrierModel>().ReverseMap();
            //产品类别
            CreateMap<AddCategoryCommand, CategoryModel>().ReverseMap();
            CreateMap<UpdateCategoryCommand, CategoryModel>().ReverseMap();
            //产品类别
            CreateMap<AddProductCommand, ProductModel>().ReverseMap();
            CreateMap<UpdateProductCommand, ProductModel>().ReverseMap();
            //库存盘点
            CreateMap<AddInventoryCommand, InventorysModel>().ReverseMap();
            CreateMap<UpdateInventoryCommand, InventorysModel>().ReverseMap();
            //库存盘点入库
            CreateMap<AddInboundCommand, InboundModel>().ReverseMap();
            //库存盘点入库明细
            CreateMap<AddInboundDetailsCommand,InboundModel>().ReverseMap();
            //工单仓库管理
            CreateMap<AddStorageCommand, StorageModel>().ReverseMap();
            //CreateMap<AddStorageCommand, StorageModel>().ReverseMap();
            CreateMap<UpdateStorageCommand, StorageModel>().ReverseMap();
        }
    }
}
